/*
 * @Author: yangrongxin
 * @Date: 2021-08-05 11:13:44
 * @LastEditors: guoju
 * @LastEditTime: 2021-12-29 17:13:56
 */
import { View, Text } from '@tarojs/components';
import { CanvasCircle } from '@/components/index';
import styles from './index.module.less';

const ProgressBar = (props: {
  questionNum: number; // 获取考题数量
  curQuestionIndex: number; // 获取当前已完成考题的数量
}) => {
  const { questionNum, curQuestionIndex } = props;

  return (
    <View className={styles.container}>
      {/* 元素本体 */}
      <View className={styles.eleContent}>
        {/* 进度条 */}
        <CanvasCircle questionNum={questionNum} curQuestionIndex={curQuestionIndex} />
        {/* 外层进度圆 */}
        <View>
          {/* 内层圆以及元素 */}
          <View>
            <Text>{curQuestionIndex}</Text>
            <View></View>
            <Text>{questionNum}</Text>
          </View>
        </View>
      </View>
    </View>
  );
};

export default ProgressBar;
